﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IBatisNet.DataMapper;
using IBatisNet.DataMapper.Configuration;
using IBatisNet.Common.Utilities;

namespace Sistema.DAO.MyBatis
{
    class MyBatisSession
    {
        private static volatile ISqlMapper _mapper = null;

        protected static void Configure(object obj)
        {
            _mapper = null;
        }

        public void Initialize()
        {
            ConfigureHandler handler = new ConfigureHandler(Configure);
            DomSqlMapBuilder builder = new DomSqlMapBuilder();
            //builder.ConfigureAndWatch(); //.Configure("Sistema.DAO.MyIbatis.SqlMap.config");
            _mapper = builder.ConfigureAndWatch(handler);
        }

    }
}
